﻿<%@ Page Title="Consulta Usuários" Language="C#" MasterPageFile="~/paginas/MasterPage.master" AutoEventWireup="true"
    CodeFile="Usuarios.aspx.cs" Inherits="paginas_Usuarios" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
     <h1>
         Consulta de Usuários
    </h1>
    <asp:MultiView ID="mvCrud" ActiveViewIndex="1" runat="server">
        <asp:View ID="ViewItems" runat="server">
            <sg:Notice ID="sgNotice" runat="server" />
            <div id="action-bar">
                <div>
                    <span>Termo
                        <asp:TextBox runat="server" ID="txtTermo" />
                    </span><span>
                        <asp:Button Text="Pesquisar" runat="server" ID="btnPesquisar" OnClick="btnPesquisar_Click" />
                        <asp:Button ID="btnLimpar" runat="server" Text="Limpar" 
                        onclick="btnLimpar_Click" />
                        <asp:Button ID="btnNovo" runat="server" Text="Cadastrar" OnClick="btnNovo_Click" />
                    </span><a href="UsuarioNovo.aspx">&nbsp;</a></div>
            </div>
            <asp:Label ID="lblPesquisa" runat="server" 
                style="font-weight: 700; color: #FF0000"></asp:Label>
            <br />
            <div id="crud-table">
                <asp:GridView runat="server" AutoGenerateColumns="False" ID="gvCrud" 
                    AllowPaging ="True" CellPadding="4" ForeColor="#333333" GridLines="None" 
                    CssClass="formataTabela" ShowFooter="True" Width="409px" 
                    >
                    <RowStyle BackColor="#EFF3FB" />
                    <Columns>
                        <asp:BoundField DataField="Usuario" HeaderText = "Usuario" />                        
                        <asp:BoundField DataField="Nome" HeaderText = "Nome" />                        
                        <asp:TemplateField HeaderText=" ">
                            <ItemTemplate>
                                <a style="color:#5ab3dd" href="UsuarioNovo.aspx?Id=<%# Eval("Id") %>">Editar</a>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#5ab3dd" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#5ab3dd" ForeColor="White" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#5ab3dd" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#2461BF" />
                    <AlternatingRowStyle BackColor="White" />
                </asp:GridView>                                               
            </div>
            
      <!-- This example uses Microsoft SQL Server and connects  -->
      <!-- to the Northwind sample database. Use an ASP.NET     -->
      <!-- expression to retrieve the connection string value   -->
      <!-- from the Web.config file.                            -->

        </asp:View>
        <asp:View ID="ViewNoItems" runat="server">
            <h1>
                Não existem &quot;usuários&quot; cadastrados
            </h1>
            <p>
                Você pode iniciar cadastrando <a href="UsuarioNovo.aspx">aqui</a>.
            </p>
        </asp:View>
    </asp:MultiView>
</asp:Content>
